package celiasoft.itasalib.query;

import celiasoft.itasalib.filegatherer.XMLGatherer;
import celiasoft.itasalib.query.resultparser.IQueryResultParser;
import celiasoft.itasalib.query.resultparser.QueryMyItasaShowSubsResultParser;
import celiasoft.itasalib.staticdata.ItasaStaticUrls;

public class MyItasaLastSubsQuery extends Query {

	private String _authcode;
	private int _page;

	public MyItasaLastSubsQuery(XMLGatherer gatherer, String apikey) {
		super(gatherer, apikey);
	}

	@Override
	protected String getQueryUrl() {
		return String.format(ItasaStaticUrls.MYITASA_LAST_SUBS_URL, getAPIKey(), this._authcode, this._page);
	}

	public String getAuthcodeKey(){
		return this._authcode.toString();
	}
	
	public void setAuthcodeKey(String key){
		this._authcode = key.toString();
	}
	
	public int getPage(){
		return this._page;
	}
	
	public void setPage(int page){
		this._page = page;
	}
	
	@Override
	protected IQueryResultParser getResultParser() {
		
		return new QueryMyItasaShowSubsResultParser();
	}
	
}
